<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商家列表</title>
<link href="./public/css/index.css" rel="stylesheet">
<script language="javascript" type="text/JavaScript">
	function show() {
		var selValue = document.getElementById("sel").value;
		console.log(selValue);
		window.location = "http://10.222.29.196:8080/amc-c/MainServlet?t_Id="
				+ selValue;
	}
</script>
<style>
a {
	text-decoration: none
}
a:visited{
color: black
}
a:link {color: black}
</style>
</head>
<body>
<div class="div-body">
<div class="nav-title-bar" >
			<span>AMC-Customer</span>
		</div>
	<div class="content-content" style="margin-left:13%;">
	<div style="text-align: center;"><label >菜品选择</label></div>
		<div class="table-menu" align="center">
			<select id="sel" onchange="show()">
				<c:forEach items="${type}" var="t">
					<option class="select-item" value="${t.key}"
						<c:if test="${t.key==tId}"><c:out value="selected"/></c:if>>${t.value.typeName}</option>
				</c:forEach><!-- 显示菜品下拉框 -->
			</select>
		</div>		
		<table align="center">
			<c:forEach items="${map}" var="merchant">
				<tr>
					<td style="width: 20px; text-align: center;"><a href="DishesServlet?m_id=${merchant.key}"><img
							src="${merchant.value.merchantPic}"
							 width="200px" height="150px"></a></td>
					<td>
						<table>
							<tr>
								<td>店名</td>
							<tr>
							<tr>
								<td><a href="DishesServlet?m_id=${merchant.key}">${merchant.value.merchantName }</a></td>
							<tr>
							<tr>
								<td>地址</td>
							<tr>
							<tr>
								<td>${merchant.value.merchantAddress }</td>
							<tr>
						</table>
					</td>
				</tr>
			</c:forEach>
		</table>
		<div style="width: 100%; text-align: center;">
			<input class="dialog-input" style="background-color: #F0F0F0; height: 36px"
				type="button" value="商家列表" onclick="location.href='MainServlet'">
		</div>
	</div>
</div>
</body>
</html>